package com.tencent.iov.cowin.befsale.clue.repository.cus.impl;

import com.github.pagehelper.Page;
import com.tencent.iov.cowin.befsale.clue.dao.cus.DealerCustomerTagRelDao;
import com.tencent.iov.cowin.befsale.clue.domain.cus.po.DealerCustomerTagRel;
import com.tencent.iov.cowin.befsale.clue.repository.cus.DealerCustomerTagRelManager;
import com.tencent.iov.cowin.befsale.clue.value.contants.ServiceConstant;
import com.software.boot.dao.annotation.TargetDataSource;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Describe: 经销商客户标签关联表_Manager实现层
 * @author: xiamu
 * @created: 2021-12-21 17:29:59
 * @version: 1.0
 */
@Service
public class DealerCustomerTagRelManagerImpl implements DealerCustomerTagRelManager {

    @Autowired
    private DealerCustomerTagRelDao dealerCustomerTagRelDao;

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_READ)
    public DealerCustomerTagRel getDetailById(Long id) {
        return dealerCustomerTagRelDao.getDetailById(id);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_WRITE)
    public int insert(DealerCustomerTagRel request) {
        return dealerCustomerTagRelDao.insert(request);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_WRITE)
    public int insertBatch(List<DealerCustomerTagRel> requests) {
        return dealerCustomerTagRelDao.insertBatch(requests);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_WRITE)
    public int update(DealerCustomerTagRel request) {
        return dealerCustomerTagRelDao.update(request);
    }

    @Override
    public int delete(Integer id) {
        return dealerCustomerTagRelDao.delete(id);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_READ)
    public List<DealerCustomerTagRel> getListByParam(DealerCustomerTagRel request) {
        return dealerCustomerTagRelDao.getListByParam(request);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_READ)
    public Page<DealerCustomerTagRel> getPageByParam(DealerCustomerTagRel request, RowBounds rowBounds) {
        return dealerCustomerTagRelDao.getPageByParam(request, rowBounds);
    }

    @Override
    @TargetDataSource(ServiceConstant.QW_SALE_READ)
    public DealerCustomerTagRel getOneByParam(DealerCustomerTagRel request) {
        return dealerCustomerTagRelDao.getOneByParam(request);
    }
}
